<?php

class Permiso extends AppModel {

    public $label = 'Permisos';
    public $displayField = 'nombre';
    public $plugin = 'Admin';
    public $hasAndBelongsToMany = array('Admin.Rol');
    public $validate = array(
        'nombre' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'El nombre es requerido'
            )
        ),
        'controller' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'El controller es requerido'
            )
        ),
        'action' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'La acción es requerida'
            )
        )
    );

}